{extend name='common/common' /}

{block name='style'}
<style media="screen">
.el-card__body{
	height: 280px;
	overflow: auto;
}
.is-group.has-gutter .is-center.table-top-header{
	color: #409eff;
	background:#b3d8ff;
}
.el-table__row.important-row {
	background:#fef0f0;
}
.FileTable .el-button.el-button--primary.el-button--mini.is-plain {
	padding: 5px;
	font-size: 20px;
}
.item.text {
	color:#e6a23c;
}
</style>
{/block}

{block name="content"}
<el-row :gutter="15">
	<el-col :md="10">
		<el-card class="box-card">
			<div slot="header">
				<span class="span-danger"><i class="fa fa-paper-plane-o"></i></span>
				未报送信息
			</div>
			{volist name="unSubTable" id="v"}
			<div class="item text">
				{$v.rpt_date|default=''}
				{$v.table_type|default=''}
				信息未报送。
			</div>
			{/volist}
		</el-card>
	</el-col>
	<el-col :md="14">
		<el-card class="box-card">
			<div slot="header">
				<span class="span-danger"><i class="fa fa-sitemap"></i></span>
				<span class="span-primary">{{DepartName}}</span>
				汇总信息
			</div>
			<el-row>
			<el-table :data="tableData1" border size="mini" style="width: 100%;text-align:center;">
				<el-table-column label="电商扶贫" align="center" label-class-name="table-top-header">
				    <el-table-column prop="a" width="165" align="center"
				  		label="建档立卡贫困村个数（个）">
			  		</el-table-column>
				    <el-table-column prop="b" align="center"
					    label="服务站点已覆盖建档立卡贫困村个数（个）">
				    </el-table-column>
					<el-table-column prop="c" align="center"
					    label="累计培训建档立卡贫困人口（人次）">
				    </el-table-column>
					<el-table-column prop="d" align="center"
					    label="累计带动建档立卡贫困人口就业人数（人）">
				    </el-table-column>
				</el-table-column>
			</el-table>
			</el-row>
			<el-row>
			<el-table :data="tableData2" border size="mini" style="width: 100%;text-align:center;">
				<el-table-column label="公共服务体系" align="center" label-class-name="table-top-header">
				    <el-table-column prop="a"  align="center"
				  		label="投入使用的县级电子商务服务中心数量（个）">
			  		</el-table-column>
				    <el-table-column prop="b" align="center"
					    label="投入使用的乡镇级电子商务服务站数量（个）">
				    </el-table-column>
					<el-table-column prop="c" align="center"
					    label="投入使用的村级服务网点数量（个）">
				    </el-table-column>
				</el-table-column>
			</el-table>
			</el-row>
			<el-row>
				<el-col :span="12">
				<el-table :data="tableData3" border size="mini" style="width: 100%;text-align:center;">
					<el-table-column label="物流配送体系" align="center" label-class-name="table-top-header">
					    <el-table-column prop="a"  align="center"
					  		label="县级物流配送中心数量（个）">
				  		</el-table-column>
					    <el-table-column prop="b" align="center"
						    label="乡镇快递网点数量（个）">
					    </el-table-column>
					</el-table-column>
				</el-table>
				</el-col>
				<el-col :span="12">
				<el-table :data="tableData4" border size="mini" style="width: 100%;text-align:center;">
					<el-table-column label="电商培训体系" align="center" label-class-name="table-top-header">
					    <el-table-column prop="a"  align="center"
					  		label="培训人数（人次）">
				  		</el-table-column>
					    <el-table-column prop="b" align="center"
						    label="电商带动全县就业人数（人）">
					    </el-table-column>
					</el-table-column>
				</el-table>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
				<el-table :data="tableData5" border size="mini" style="width: 100%;text-align:center;">
					<el-table-column label="资金使用" align="center" label-class-name="table-top-header">
					    <el-table-column prop="a"  align="center"
					  		label="累计拨付金额（万元）">
				  		</el-table-column>
					    <el-table-column prop="b" align="center"
						    label="资金拨付率（%）">
					    </el-table-column>
					</el-table-column>
				</el-table>
				</el-col>
				<el-col :span="12">
				<el-table :data="tableData6" border size="mini" style="width: 100%;text-align:center;">
					<el-table-column label="资金管理" align="center" label-class-name="table-top-header">
					    <el-table-column prop="a"  align="center"
					  		label="已拨付金额（万元）">
				  		</el-table-column>
					    <el-table-column prop="b" align="center"
						    label="未拨付金额（万元）">
					    </el-table-column>
					</el-table-column>
				</el-table>
				</el-col>
			</el-row>
		</el-card>
	</el-col>
</el-row>
<el-row :gutter="15">
	<el-col :md="14">
		<el-card class="box-card">
			<div slot="header">
				<span class="span-danger"><i class="fa fa-download"></i></span>
				文件下载
			</div>
			<el-table :data="fileTable.tableData" :show-header="false" class="FileTable">
			    <el-table-column prop="name">
					<template slot-scope="scope">
						{{scope.row.name}}
						<span class="span-danger">{{scope.row.important}}</span>
					</template>
			    </el-table-column>
			    <el-table-column prop="publish_time_name" align="center" width="150"></el-table-column>
				<el-table-column align="center" width="70">
					<template slot-scope="scope">
						<el-tooltip content="下载" open-delay="500" hide-after="1500" placement="left">
						<el-button
							@click="downloadFileRow(scope.row)"
							size="mini" plain type="primary"
							icon="fa fa-cloud-download">
						</el-button>
						</el-tooltip>
					</template>
			    </el-table-column>
			</el-table>
			<div class="table-page">
				<el-pagination
					@size-change="pageSizeChange"
					@current-change="curPageChange"
					:current-page="fileTable.pageNumber"
					:page-sizes="[10, 20, 50, 75]"
					:page-size="fileTable.pageSize"
					layout="total, sizes, prev, pager, next, jumper"
					:total="fileTable.tableTotal">
				</el-pagination>
			</div>
		</el-card>
	</el-col>
	<el-col :md="10">
		<el-card class="box-card">
			<div slot="header">
				<span class="span-danger"><i class="fa fa-phone"></i></span>
				联系方式
			</div>
			<el-collapse accordion>
				<el-collapse-item>
					<template slot="title">
						孔留洋<span class="span-success">（业务支持）</span>
					</template>
					<div><el-tag size="mini">座机：</el-tag>0872-65229788</div>
					<div><el-tag size="mini">手机：</el-tag>18314168289</div>
					<div><el-tag size="mini">Q Q ：</el-tag>1433192243</div>
				</el-collapse-item>
				<el-collapse-item>
					<template slot="title">
						代琳芬<span class="span-primary">（技术支持）</span>
					</template>
					<div><el-tag size="mini">座机：</el-tag>0871-63359811</div>
					<div><el-tag size="mini">手机：</el-tag>18314460511</div>
					<div><el-tag size="mini">Q Q ：</el-tag>1780618675</div>
				</el-collapse-item>
			</el-collapse>
		</el-card>
	</el-col>
</el-row>
{/block}

{block name="script"}
<script type="text/javascript">
var main = new Vue({
	el:"#main",
	data:{
		tableData1:[{a:0,b:0,c:0,d:0}],
		tableData2:[{a:0,b:0,c:0}],
		tableData3:[{a:0,b:0}],
		tableData4:[{a:0,b:0}],
		tableData5:[{a:0,b:0}],
		tableData6:[{a:0,b:0}],
		DepartName:"",
		fileTable:{
			tableData:"",
			pageSize:10,
			pageNumber:1,
			tableTotal:0,
		},
		loading:false
	},
	mounted:function (){
		this.getFileTableData();
		this.getStatisticTable();
	},
	methods: {
		getFileTableData() {
			this.loading=true;
			$.post('{:url("Filedownload/getIndexTable")}',{
				'pageSize':this.fileTable.pageSize,
				'pageNumber':this.fileTable.pageNumber,
			},function(res){
				main.loading=false;
				if(res.code == 1){
					main.$message({message: res.msg,type: 'success'});
					main.fileTable.tableData = res.data.rows;
					main.fileTable.tableTotal = res.data.total;
				}else{
					main.$notify.error({title: '失败',message: res.msg});
				}
			})
		},
		getStatisticTable() {
			$.post('{:url("index/getStatisticTable")}',function(res) {
				if(res.code == 1){
					main.tableData1 = res.data.tableData1;
					main.tableData2 = res.data.tableData2;
					main.tableData3 = res.data.tableData3;
					main.tableData4 = res.data.tableData4;
					main.tableData5 = res.data.tableData5;
					main.tableData6 = res.data.tableData6;
					main.DepartName = res.depart.name;
				}else{
					main.$notify.error({title: '失败',message: res.msg});
				}
			});
		},
		pageSizeChange(val) {
			this.fileTable.pageSize = val;
			this.getTable();
		},
		curPageChange(val) {
			this.fileTable.pageNumber = val;
			this.getTable();
		},
		downloadFileRow(row) {
			var uri = '{:url("Filedownload/myDownloadFile")}?url='+row.url;
			window.open(uri);
		},
	}
});
</script>
{/block}
